package com.wissen.proxy;
/**
 * this class to excute proxy object like card of class bank
 * @author wissen16
 */
public class Proxy {
	/**
	 * funcition to call proxy object @ make changes in real object
	 * @param argv console input 
	 */
public static void main(String argv[]){
	ProxyCreditCard pcard=new ProxyCreditCard();
	Merchant Marchant=new Merchant();
	for(int i=0,amount=100;i<5;i++,amount+=100){
		if(!pcard.withdraw(Marchant.names[i],amount))
			System.out.println("No money for Merchant :"+Marchant.names[i]);
		else
			System.out.println(amount+" Dollars for "+Marchant.names[i]);
	}
	System.out.println("Remaining Balance is "+pcard.getBalance());
}
}
